#ifndef GAMEMODULE_H_
#define GAMEMODULE_H_

#include "DataModule.h"

#include <string>
#include <map>

class GameModule : public DataModule {
  private:
    virtual const int countSubModules() = 0;
    virtual void loadSubModules() = 0;
  protected:
    DataModule **modules;
  public:
    ~GameModule();

    void init();
    void destroy();

    void printAllModules();

    virtual const char* getName() = 0;
    virtual const char* getCredits() = 0;

    void readFromRom(Rom& rom);
    void writeToRom(Rom& rom);
    void readFromDat(char* dirName, std::map<std::string, std::string> &fns, std::map<std::string, int> &labels);
    void writeToDat(char* dirName, std::map<std::string, std::string> &fns);
};

#endif
